import { message } from "ant-design-vue";
import { defineStore } from "pinia";

export const useTipsStore = defineStore("tips", {
  state: () => ({
    isAutoTip: false,//是否自动提示
    stepTip: 0,//当前提示步骤,
    showNotAutoTip: false,//是否显示非自动提示
    showAutoTip: false,//是否显示自动提示
    isAutoExit:false,//自动流程完成后退出
    isNext: false,//跳过当前
    isExitStatus:false,//是否是退出状态
    notAutoTipContent: "",//非自动提示内容
    autoTipContent: "",//自动提示内容
  }),
  getters: {
    getStepTip(state: any) {
      return state.stepTip;
    },
  },
  actions: {
    setStepTip(step: Number) {
      this.stepTip = step;
    },
    setAutoTip(boolean: boolean) {
      this.isAutoTip = boolean;
    },
    setShowNotAutoTip(boolean: boolean) {
      this.showNotAutoTip = boolean;
    },
    setnotAutoTipContent(content: string) {
      this.notAutoTipContent = content;
    },
    setAutoTipContent(content: string) {
      this.autoTipContent = content;
    },
    setShowAutoTip(boolean: boolean) {
      this.showAutoTip = boolean;
    },
    setIsAutoExit(boolean: boolean) {
      this.isAutoExit = boolean;
    },
    setIsExitSatus(boolean: boolean) {
      this.isExitStatus = boolean;
    },
    setIsNext(boolean: boolean) {
      this.isNext = boolean;
    },
    clearTipState() {
      this.isAutoTip = false;//是否自动提示
      this.stepTip = 0;//当前提示步骤,
      this.showNotAutoTip = false;//是否显示非自动提示
      this.showAutoTip = false;//是否显示自动提示
      this.isAutoExit = false;//自动流程完成后退出
      this.isNext = false;//跳过当前
      this.notAutoTipContent = "";//非自动提示内容
      this.autoTipContent = "";//自动提示内容
    }
  },
});
